package cn.yanxi.service.serviceImpl;

import cn.yanxi.dao.UserMapper;
import cn.yanxi.model.User;
import cn.yanxi.service.UserService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by 言溪 on 2016/11/15.
 */
@Service("userServiceImpl")
public class UserImple implements UserService {
    private static final Log log= LogFactory.getLog(UserImple.class);
    @Resource
    private UserMapper userMapper;
    public void saveUser(User user) {
        log.info("satrt");

      try {
          userMapper.insert(user);
         // userDao.saveUser(user);
          System.out.println("save success");
      }catch (Exception e){
          e.printStackTrace();
          System.out.println("save faile");
      }

    }
}
